# - Try to find LibConfig include dirs and libraries

cmake_minimum_required(VERSION 2.4)

find_path(LibConfig_ROOT_DIR
    NAMES include/libconfig.h
)

find_path(LibConfig_INCLUDE_DIR
    NAMES libconfig.h
    HINTS ${LibConfig_ROOT_DIR}/include
)

find_library(LibConfig_LIBRARY
    NAMES config++
    HINTS ${LibConfig_ROOT_DIR}/lib
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibConfig DEFAULT_MSG
    LibConfig_LIBRARY
    LibConfig_INCLUDE_DIR
)

mark_as_advanced(
    LibConfig_ROOT_DIR
    LibConfig_INCLUDE_DIR
    LibConfig_LIBRARY
)